<?php
namespace app\index\model;
use think\Model;
use think\Paginator;

/**
 * 
 */
class Customer extends Model
{
	
	// 指定表名,不含前缀
	protected $name = 'customer';
	/*获取用户列表信息*/
	public static function getList()
	{
		$Model = new Customer();
		$list  = $Model-> where('status = 1 and is_del = 0')->order('id desc')->paginate(20);
		foreach ($list as $k => $v) {
			$list[$k]['level'] = DB::name('customer_level')->where('id ='.$v['level'])->value('title');
		}
		return $list;
	}
}
?>